package com.slc.datatransfer;

import net.sf.jxls.transformer.XLSTransformer;
import org.apache.poi.openxml4j.exceptions.InvalidFormatException;
import org.apache.poi.ss.usermodel.Workbook;

import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.IOException;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * Created by sunguangzhu on 2015/3/12.
 */
public class Demo {
//    public static final String path = "E:\\datatransfer-excel\\";

    public static void main(String[] args) throws IOException, InvalidFormatException {
        //创建测试数据
//        List<Map<String, Object>> list = new ArrayList<Map<String, Object>>();
//        Map<String, Object> map1 = new HashMap<String, Object>();
//        map1.put("name", "电视");
//        map1.put("price", "3000");
//        map1.put("desc", "3D电视机222333");
//        Map<String, Object> map2 = new HashMap<String, Object>();
//        map2.put("name", "空调");
//        map2.put("price", "2000");
//        map2.put("desc", "变频空调222333");
//        list.add(map1);
//        list.add(map2);
//        Map beans = new HashMap();
//        beans.put("list", list);
//        ExcelUtil.generateExcel(path + "1.xls", beans, path + "2.xls");
//        ExcelUtil.generateExcel(path + "1.xls", beans, "E:\\datatransfer-excel2\\" , "2.xls");

    }
}
